package com.feidee.bigdata.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @Author:CHQ
 * @Date:2020/4/27 10:22
 * @Description
 */
@RestController
public class ConsumerController {
    public static final String serverURL = "http://nacos-payment-provider";
    @Autowired
    private RestTemplate restTemplate;

    @RequestMapping("/testNacos")
    public String testNacos() {
        return restTemplate.getForObject(serverURL + "/nacos", String.class);
    }

}
